//package cn.regexp.elasticjob.job.annotation;
//
//import cn.regexp.elasticjob.annotation.ElasticJobConf;
//import com.dangdang.ddframe.job.api.ShardingContext;
//import com.dangdang.ddframe.job.api.dataflow.DataflowJob;
//import lombok.extern.slf4j.Slf4j;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//
//import java.util.ArrayList;
//import java.util.List;
//
//@ElasticJobConf(name = "demoDataFlowJob", cron = "0/10 * * * * ?", shardingTotalCount = 2,jobParameter = "test",shardingItemParameters = "0=a,1=b")
//@Slf4j
//public class DemoDataFlowJob implements DataflowJob<String> {
// //   private final Logger logger = LoggerFactory.getLogger(this.getClass());
//
//    @Override
//    public List<String> fetchData(ShardingContext shardingContext) {
//        String shardingParameter = shardingContext.getShardingParameter();
//        int shardingItem = shardingContext.getShardingItem();
//        String jobParameter = shardingContext.getJobParameter();
//        String jobName = shardingContext.getJobName();
//
//
//        log.info("fetchData execute-------------");
//        List<String> jobList = new ArrayList<>();
//        for(int i=0; i<10; i++) {
//            jobList.add("job"+i);
//        }
//        return jobList;
//    }
//
//    @Override
//    public void processData(ShardingContext shardingContext, List<String> data) {
//
//        for (String datum : data) {
//            System.out.println(datum);
//        }
//        log.info("processData execute------------");
//    }
//}